﻿using WPFLocalizeExtension.Engine;

namespace JIG_SoftTemplate.Common.Services
{
    public class LangSwitchService
    {
        /// <summary>
        /// 切换显示语言
        /// </summary>
        public void LangSwitch(string selectedLang)
        {
            switch (selectedLang)
            {
                case "English":
                    LocalizeDictionary.Instance.Culture = new System.Globalization.CultureInfo("en");
                    break;
                case "简体中文":
                    LocalizeDictionary.Instance.Culture = new System.Globalization.CultureInfo("zh-CN");
                    break;
                default:
                    throw new Exception("选择语言错误");
            }
        }
    }
}
